package com.gnerv.pabu.basic.core.controller;

import com.gnerv.pabu.basic.core.entity.Result;
import com.gnerv.pabu.basic.core.service.IMonitorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 基础平台-监控信息
 *
 * @author gnerv
 * @date 2019/11/30
 **/
@Api(tags = "监控信息")
@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/api/manage/monitor")
public class MonitorController {

    private IMonitorService monitorService;


    @ApiOperation(value = "查询权限 根据权限逻辑主键")
    @RequestMapping(value = "/list}", method = RequestMethod.GET)
    public Result listJVM() {
        List<Map<String, Object>> jvm = monitorService.listJvm();
        return Result.response().data("jvm", jvm);
    }


}
